{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2000"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tbl = pd.read_csv('result',  sep=' ')\n",
    "# tbl['Primary'] = tbl['Primary']*100\n",
    "len(tbl)\n",
    "tbl['Time'] = (tbl['Time'] - min(tbl['Time']))/(max(tbl['Time'])-min(tbl['Time']))\n",
    "tbl['Space'] = (tbl['Space'] - min(tbl['Space']))/(max(tbl['Space'])-min(tbl['Space']))\n",
    "plt.figure(figsize = (10, 10))\n",
    "\n",
    "plt.plot(tbl[['Time', 'Space']])\n",
    "plt.ylabel('Volume')\n",
    "plt.xlabel('Spare_capacity')\n",
    "plt.title('Space and Time Curve')\n",
    "plt.legend(['Time', 'Space'])\n",
    "plt.savefig('fig.png', facecolor = 'w')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "e42a1b90ff3b54e29f4cdb4a67e80d8e6e95f6a0c26c2908250ecfebf85bc404"
  },
  "kernelspec": {
   "display_name": "Python 3.9.7 64-bit ('env1': conda)",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
